/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx.example;

/**
 * <p>Project: javaseapp - Math01
 * <p>Powered by webrx On 2021-07-28 16:45:37
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class Math01 {
    public static void main(String[] args) {
        //java.lang.Math 构造方法是私有，不让new
        double pi = Math.PI;
        System.out.println(pi);
        System.out.println(Math.random());
        System.out.println(Math.round(1.4));//1
        System.out.println(Math.round(1.5));//2
        System.out.println(Math.floor(1.4));//1.0
        System.out.println(Math.floor(1.5));//1.0
        System.out.println(Math.ceil(1.4));//2.0
        System.out.println(Math.ceil(1.5));//2.0
        System.out.println(Math.pow(2,3));
        System.out.println(Math.max(10,20));//20
        System.out.println(Math.min(10,20));//10
    }
}
